﻿<%@ Page Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<MShop.Core.Domain.ShopUsersAddress>" %>

<asp:Content ID="Content3" ContentPlaceHolderID="cphMeta" runat="server">
    <link type="text/css" rel="stylesheet" href="/css/userCenter.css" />
</asp:Content>
<asp:Content ID="changePasswordContent" ContentPlaceHolderID="MainContent" runat="server">
    <% using (Html.BeginForm())
       { %>
    <div id="content" class="ovfl">
        <div id="left" class="side fl">
            <%=Html.Action("menu")%>
        </div>
        <div id="right" class="main fr">
            <div class="main_ct personal">
                <h2 class="title">
                    我的收货地址
                </h2>
                <div class="u_box">
                    <table class="userInfo">
                        <tr>
                            <td class="text_right">
                                <%: Html.LabelFor(model => model.AreaId) %>：
                            </td>
                            <td> <%: Html.Partial("areacontrol", ViewData["area"])%>
                                <%: Html.ValidationMessageFor(model => model.AreaId)%>
                            </td>
                        </tr>
                        <tr>
                            <td class="text_right">
                                <%: Html.LabelFor(model => model.Location)%>：
                            </td>
                            <td>
                                <%: Html.EditorFor(model => model.Location)%>
                                <%: Html.ValidationMessageFor(model => model.Location)%>
                            </td>
                        </tr>
                        <tr>
                            <td class="text_right">
                                <%: Html.LabelFor(model => model.Postcode)%>：
                            </td>
                            <td>
                                <%: Html.EditorFor(model => model.Postcode)%>
                                <%: Html.ValidationMessageFor(model => model.Postcode)%>
                            </td>
                        </tr>
                        <tr>
                            <td class="text_right">
                                <%: Html.LabelFor(model => model.ReceiverName)%>：
                            </td>
                            <td>
                                <%: Html.EditorFor(model => model.ReceiverName)%>
                                <%: Html.ValidationMessageFor(model => model.ReceiverName)%>
                            </td>
                        </tr>
                        <tr>
                            <td class="text_right">
                                <%: Html.LabelFor(model => model.Mobile)%>：
                            </td>
                            <td>
                                <%: Html.EditorFor(model => model.Mobile)%>
                                <%: Html.ValidationMessageFor(model => model.Mobile)%>
                            </td>
                        </tr>
                        <tr>
                            <td class="text_right">
                                <%: Html.LabelFor(model => model.Tel)%>：
                            </td>
                            <td>
                                <%: Html.EditorFor(model => model.Tel)%>
                                <%: Html.ValidationMessageFor(model => model.Tel)%>
                            </td>
                        </tr>
                        <tr>
                            <td class="text_right">
                                <%: Html.LabelFor(model => model.IsDefault)%>：
                            </td>
                            <td>
                                <%: Html.EditorFor(model => model.IsDefault)%>
                                <%: Html.ValidationMessageFor(model => model.IsDefault)%>
                            </td>
                        </tr>
                        <tr>
                            <td class="text_right">
                            </td>
                            <td>
                                <input type="submit" value="保存地址" class="btn_login" />
                                <input type="button" value=" 返 回 " onclick="location.href='/usercenter/address';"
                                    class="btn_login" />
                            </td>
                        </tr>
                    </table>
                </div>
                <h2 class="title">
                    我已有的地址
                </h2>
                <ul>
                    <%foreach (var item in ViewData["address"] as IEnumerable<ShopUsersAddress>)
                      { %>
                    <li> 地址：<%=item.AreaGroup.CurrentAreaName %>
                        <%=item.Location %> 联系人：<%=item.ReceiverName %>

                    </li>
                    <%} %>
                </ul>
            </div>
        </div>
    </div>
    <% } %>
</asp:Content>
